Discuss / Python / 交作业,好像写麻烦了

交作业,好像写麻烦了

Topic source

哒哒大萌

#1 Created at ... [Delete] [Delete and Lock User]

a = input('Please enter your password:')

x = 0

for b in a :

    if b == ' ':

        x = x + 1

        #print(x)

    else:

        a = a[x:]

        x = 0

        #print(x)

print(a[:-x])


  • 1

Reply