sak1b

string_split_last_word

Nov 14th, 2021
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.13 KB | None | 0 0
  1. my_string = "xxxxabcyyyyabczzz"
  2.  
  3. words = my_string.split("abc") #list return kore
  4.  
  5. length = len(words)
  6.  
  7. print(words[length-1])
  8.  
  9.  
Advertisement
Add Comment
Please, Sign In to add comment