1、>>> myteacher = ‘big‘
>> yourteacher = myteacher
>> myteacher = ‘small‘
>> print(yourteacher)
→big
错误答案:myteacher
2、>>> first = 100
>> second = ‘100‘
>> first = second
>> print (first)
→100
错误答案:‘100’
3、除了\进行转义,还有什么方法
>>str = "Let‘s go!"
>>print(str)
→Let’s go!
双引号和三引号("""...""")中可以包含单引号,三引号(‘‘‘...‘‘‘)可以包含双引号,而不需要转义
原文地址:http://blog.51cto.com/12686555/2131441
时间: 2024-10-24 14:38:26