Not able to print statements with 'Apostrophe' in it in Python. Invalid syntax error

前端 未结 5 1973
眼角桃花
眼角桃花 2020-12-03 17:50

Eg.

when iam trying to write something like below which uses an apostrophe in the sentence,

print(\'\'I am jack\'s raging bile duct\'\')
5条回答
  •  臣服心动
    2020-12-03 18:03

    There are 2 ways:

    print('I am jack\'s raging bile duct')
    

    or:

    print("I am jack's raging bile duct")
    

提交回复
热议问题