• 2022-06-06
    spam='python 编程'print(spam[-1:0]报错。
  • 内容

    • 0

      以下程序执行的结果是:spam=['cat','bat','rat','elephant'] spam[1:4] A: ['bat', 'rat', 'elephant'] B: ['cat', 'bat', 'rat', 'elephant'] C: ['cat', 'bat', 'rat'] D: ['bat', 'rat']

    • 1

      下列 Python语句的程序运行结果为list1=[1,2,3];list2=[3,4,5];dict1={'1':list1,'2':list2};dict2=dict1.copy()dict1['1'][0]=15; print(dict1['1'][0]+dict2['1'][0])

    • 2

      以下程序执行后的结果是:spam=40 spam=spam+2 print(spam) A: 42 B: 40 C: error D: 2

    • 3

      What will be the output of the following Python code? [br][/br]['f', 't'][bool('spam')] A: t B: f C: No output D: Erro

    • 4

      What is spam? Spam is _____ email.