Stack Overflow на русском Asked by Krempli on November 13, 2021
Вопрос от новичка Python
Ничего не выводит.
Хотя пишу в 'user' -> Привет
vocabulary = {
'hello': ('Привет' , 'привет' ,)
}
user = input('Enter: ')
if user == 'hello' :
print('Hello')
vocabulary = {
'привет': 'hello'
}
user = input('Enter: ')
print(vocabulary[user.lower().strip()] if user.lower().strip() in vocabulary else None)
Answered by Namerek on November 13, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP