+ 10
U14known ,
since the input is just a number, or a a number with 2 leading *HYPHEN MINUS*, i don't think that we need to use regex.
it could be done like:
https://code.sololearn.com/c0uzsPoW7Ie0/?ref=app
+ 6
mmaos QQQ ,
to create a new question you can do:
> go to the *create section* (bottom of page)
> select *discuss* (top of page)
> click *+ new post* button
+ 4
U14known ,
pease make an input sample and what you are expecting as output.
+ 4
U14known ,
the "--" that you have use are 2 *HYPHEN MINUS* (unicode id / ascii 45). is this what you have meant?
+ 3
U14known ,
I improved your code a bit
I hope this is what you wanted
import re, string
letter=list(string.ascii_lowercase)
str_in = input()
cap = str_in[:2] == "--"
sp = int(re.findall(r"\d+",str_in)[0])-1
if cap: print(letter[sp].upper())
else: print(letter[sp])
https://code.sololearn.com/cncy8PiCii50
+ 2
https://code.sololearn.com/cB7wkbqOzyqZ/?ref=app
+ 1
The output is a list of int though.
https://code.sololearn.com/cLe5suunzki8/?ref=app
0
How to add question? I can not see button to add that
0
Input 12