I am trying to define a function, which prints the exact length of the string (which may be any length - based on user input), as numbers. For example:
string = "hello"
length of the string is 5, so the python prints this line:
"1 2 3 4 5"
and if
string = "notnow"
length of string is 6, so the python prints this line:
"1 2 3 4 5 6"
len
,range
,str
; use" ".join
for additional credit :)