Answer the question
In order to leave comments, you need to log in
Inverse join function
There is a code:
from random import randrange as rnd
a = [rnd(10) for x in range(50)]
print a
print ''.join(map(str,a))
a = ''.join(map(str,a))
c = []
print a.split('0')
c = a.split('0')
if len(c) > 2:
b = []
b.append(c[0])
b.append(c[-1])
print b
if len(c) == 2:
q = []
q.append(c[-1])
print q
if len(c) < 2:
print a
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question