Skip to content

Instantly share code, notes, and snippets.

@Mohammadgeek
Created August 19, 2022 14:52
Show Gist options
  • Save Mohammadgeek/9d41066f438100ddd566109aab06da67 to your computer and use it in GitHub Desktop.
Save Mohammadgeek/9d41066f438100ddd566109aab06da67 to your computer and use it in GitHub Desktop.
translate app
sample_dict = {'you':'shoma',
'goodbye':'khodafez',
'we':'ma',
'hello':'salam',
'food': 'ghaza',
'today': 'emshab',
'tonight':'shab',
}
lst = set(sample_dict.keys())
print(lst)
tedad_kalamat = int(input())
for radif in range (0, tedad_kalamat):
word = input()
conv = word.split(' ')
y = set(conv)
result = y & lst
if result:
print(f'the repeat charchter equall is : {result}')
differnet = lst.difference(y)
print(differnet)
else:
print('empty text!')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment