how to use concatenate a fixed string and a variable in Python

前端 未结 6 1553
借酒劲吻你
借酒劲吻你 2020-12-05 23:16

I want to include file name \'main.txt\' in the subject for that I am passing file name from command line. but getting error in doing so

python sample.py ma         


        
6条回答
  •  天命终不由人
    2020-12-05 23:22

    variable=" Hello..."  
    print (variable)  
    print("This is the Test File "+variable)  
    

    for integer type ...

    variable="  10"  
    print (variable)  
    print("This is the Test File "+str(variable))  
    

提交回复
热议问题