my code working find on win machine , python 3.6 try code on mac - terminal , showing me error. have install latest version of python code:
print ("==================================") print (" print string character ") print ("==================================") word_secund = input("please add word: ") word_one = str(word_secund) def list(text): word = 0 word in text: print(word) print (list(word_one))
error message:
please add word: slavo traceback (most recent call last): file "strings.py", line 5, in <module> word_secund = input("please add word: ") file "<string>", line 1, in <module> nameerror: name 'slavo' not defined
this error happens python2. note on mac , linux, default python python2. try run program command
python3 yourfile.py
to avoid error.
Comments
Post a Comment