def generate_n_chars(n,s="."):
res=""
count=0
while count < n:
count=count+1
res=res+s
return res
print generate_n_chars(raw_input("Enter the integer value : "),raw_input("Enter the character : "))
我是初學者在Python中,我不知道爲什麼這個循環會無限。請人糾正我的程序while循環python導致無限循環
你能添加輸入你用什麼? –
你比較字符串的數字。 –