Python Core task error | Sololearn: Learn to code for FREE!


Python Core task error

type = input() if type=="Visa" or type=="Amex": print("accepted") What's wrong? I'm a begginer. 💚

8/5/2022 5:14:28 PM

Anna - Alina

6 Answers

New Answer


this issue with illegal characters can happen when we copy and paste from websites or by using not suitable editors like word processing programs.


in the line if... there are some illegal characters used that are control sequences (dec= 10, hex= 0a, start of manual message) re-type the line should help. this line should not have an indentation.


type is a keyword in python. How about cardtype?


I re-typed and it helped, I solved the task, still not what was the issue in the first place.


I dont know , maybe I copied something idr now I will know, thanks 👍


Bro can you type the code instead of copy and paste because if you type the code then the code will run successfully