Skip to content

Instantly share code, notes, and snippets.

@webdeli
Last active January 4, 2016 00:29
Show Gist options
  • Save webdeli/8541975 to your computer and use it in GitHub Desktop.
Save webdeli/8541975 to your computer and use it in GitHub Desktop.
Sampling large sting into smaller chunks
input_variable = "dsjkhflksd"
print[0:9] dsjkhflksd
print[0:8] dsjkhflks
print[1:9] sjkhflksd
print[0:7] dsjkhflk
print[1:8] sjkhflks
print[2:9] jkhflksd
print[0:6] dsjkhfl
print[1:7] sjkhflk
print[2:8] jkhflks
print[3:9] khflksd
print[0:5] dsjkhf
print[1:6] sjkhfl
print[2:7] jkhflk
print[3:8] khflks
print[4:9] hflksd
print[0:4] dsjkh
print[1:5] sjkhf
print[2:6] jkhfl
print[3:7] khflk
print[4:8] hflks
print[5:9] flksd
print[0:3] dsjk
print[1:4] sjkh
print[2:5] jkhf
print[3:6] khfl
print[4:7] hflk
print[5:8] flks
print[6:9] lksd
print[0:2] dsj
print[1:3] sjk
print[2:4] jkh
print[3:5] khf
print[4:6] hfl
print[5:7] flk
print[6:8] lks
print[7:9] ksd
print[0:1] ds
print[1:2] sj
print[2:3] jk
print[3:4] kh
print[4:5] hf
print[5:6] fl
print[6:7] lk
print[7:8] ks
print[8:9] sd
print[0] d
print[1] s
print[2] j
print[3] k
print[4] h
print[5] f
print[6] l
print[7] k
print[8] s
print[9] d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment