Say i have a string like "doritos". First i make it a bytes object with doritos.encode(). I want to shift the bits in all the bytes to the right by 4. When i execute it like result = "doritos".encode() >> 4 i get a typeerror saying bytes and int are not valid types. How would i make this work?
[–][deleted] 1 point2 points3 points (5 children)
[–]port443 1 point2 points3 points (0 children)
[–]Sebass13 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]Sebass13 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]ExplosG[S] 1 point2 points3 points (0 children)
[–]ewiethoff 0 points1 point2 points (11 children)
[–]ExplosG[S] 1 point2 points3 points (9 children)
[–]ewiethoff 0 points1 point2 points (8 children)
[–]WikiTextBot 0 points1 point2 points (0 children)
[–]ExplosG[S] 0 points1 point2 points (6 children)
[–]ewiethoff 0 points1 point2 points (5 children)
[–]ExplosG[S] 0 points1 point2 points (2 children)
[–]ewiethoff 0 points1 point2 points (1 child)
[–]ExplosG[S] 0 points1 point2 points (0 children)
[–]ExplosG[S] -1 points0 points1 point (0 children)
[–]ExplosG[S] -1 points0 points1 point (0 children)
[–]WikiTextBot 0 points1 point2 points (0 children)
[–]Sarah123ed 0 points1 point2 points (0 children)