Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Rayhan 001

touhidpro Apr 4th, 2020 127 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. str = "aaababbbaaaaa"
  2. ans = [ ]
  3. sub_str=""
  4. save = str[0]
  5.  
  6. for i in str:
  7.     if i != save:
  8.         ans.append( sub_str )
  9.         sub_str = ""
  10.         save = i
  11.     sub_str += i
  12.  
  13. ans.append( sub_str )
  14.  
  15. print( str )
  16. print( ans )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top