[Solved] Why this is showing a syntax error?


Two things, just at a glance.

As Rakesh’s answer states, platform00.upper() = input("etc") is not valid syntax, and should replaced with platform00 = input("etc").upper(). The way you have it, you’re attempting to set a value to a non-variable, specifically the return value of a function.

For a second thing, you have a curly brace in your code, on line 74 (def learnpython() : {) as if to define a function. Python is a whitespace-based language; functions are defined by indentation, not curly braces. You’re thinking of a language like the C family, or Java. Python does use curly braces, but curly braces denote a dictionary. Since foo = bar is not valid syntax for initializing a dictionary, it’s giving you a syntax error.

4

solved Why this is showing a syntax error?