i want to use a function like "{}".format (variable)
so i can transform a string like: "
A1B345FS
" And i want to have something like: "
A1:B3:45:FS
" i am not able to use a while or a for.
Can i use .join (variable) ????
i want to use a function like "{}".format (variable)
so i can transform a string like: "
A1B345FS
" And i want to have something like: "
A1:B3:45:FS
" i am not able to use a while or a for.
Can i use .join (variable) ????
I think the following code solves the problem.
import re
s = "A1B345FS"
s2=re.findall('..',s)
s3=":".join(s2)
print(s3)