简体   繁体   中英

how do I save the length of a input as a variable

I am trying to see the amount of characters imputed and save it as a variable!

I have tried multiple things from other websites but none of them work or they are for java

I am new to this website and python so i hope you can help!

使用len()函数

length = len(input("Enter stuff: "))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM