turk = {"Ç":"C","ç":"c","Ğ":"G","ğ":"g","İ":"I","ı":"i",
"Ö":"O","ö":"o","Ş":"S","ş":"s","Ü":"U","ü":"u"}
eng = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz \t1234567890"
space = " "
word = input("Enter a word")
def turkChar (word):
newword = ""
for c in word:
if c in eng:
newword = newword + c
elif c in turk:
newword = newword + turk[c]
else:
newword = newword + space
return newword
I wrote this simple code which turns Turkish chars into English. I added space variable to make a space but what if user wants to make more space or tab or even numbers. How can I make this ?