Invalid syntax error after printing formatted string | بلاگ

Invalid syntax error after printing formatted string

تعرفه تبلیغات در سایت

آخرین مطالب

امکانات وب

Vote count: 0

def display_line(country_name, region_name, happiness_score):
    print("{:24s}{:<32s}{:<17.2f}".format(country_name, region_name, happiness_score)

def main():

I don't understand why I am experiencing an invalid syntax error on the line containing "def main()". I thought that my string formatting line is correct, no? Could this error be caused by something beyond these lines of code?

Error traceback message:

runfile('/Users/brandononeil/Documents/SS18proj05.py', wdir='/Users/brandononeil/Documents') File "/Users/brandononeil/Documents/SS18proj05.py", line 37 def main(): ^ SyntaxError: invalid syntax

asked 17 secs ago
Brandon O'Neil

...
نویسنده : استخدام کار بازدید : 13 تاريخ : چهارشنبه 25 بهمن 1396 ساعت: 8:25