Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def cortarString (status, n):
- ''' Corta un string en "n" piezas. Crea una lista donde cada elemento estará conformado por los "n" caracteres correspondientes. Recordar que i va tomando valores según la funcion range donde range(start, stop=fin del string, step= "n" caracteres) '''
- lista = [status[i:i+n] for i in range(0, len(status), n)]
- return lista
- status = 'More travel stories from Vietnam Read: 24 first hours in Hanoi, Vietnam with Students Read: drinking Rice shots with Vietnam War Veterans – – – This story was experienced by our writer Kelly, a fearless, adventure-seeking creative here at Hostelgeeks. Find all travel stories with Hostelgeeks. #travel #traveled #traveling #including #include #vietnam #tips #read #new #hostel #hostels #best #experiences #experience #elephant #official #come'
- print(cortarString(status, 280))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement