如何用Python编写此(Java)?
class Test
{
private String test1 = "test";
private static void main(String args[])
{
System.out.println("test" + test1);
}
}
最佳答案
由于Python支持类之外的代码,因此等效方式非常简单:
test1 = "test"
print("test" + test1)
更新:要获取参数:
import sys
print sys.argv
您真的应该从the tutorial开始!
关于python - 如何用Python编写此Java代码?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/8256612/