Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

expand alphabets in python

t='13e14r'
num=[]
for i in range(len(t)):
  if t[i].isalpha()!=True:
    num.append(t[i])
  else:
    num=[str(x) for x in num]
    nu = "". join(num)
    n = int(nu)
    for ii in range(n):
      print(t[i],end='')
    num=list()
 
PREVIOUS NEXT
Tagged: #expand #alphabets #python
ADD COMMENT
Topic
Name
7+2 =