[英]Python: Assign letter and number to a variable without spaces
I was wondering.我想知道。 how can I get the output like this, and store it in to a string?
我怎样才能得到这样的输出,并将其存储到一个字符串中?
from __future__ import print_function
for i in range(0,3):
if i > 0:
print("G",i,sep="")
output:输出:
G1
G2
I was wondering how I can store the values into a string?我想知道如何将值存储到字符串中? (for-loop)
(循环)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.