Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I’m on mobile so hopefully the formatting gods are on my side
- class array:\
- def __init__(self):\
- self.__str = “”\
- def get(self, num):\
- commas = 0\
- ret = “”\
- for char in self.__str:\
- if char == “,”:\
- commas+=1\
- if commas < num:\
- continue\
- If commas == num:\
- ret += char\
- If commas > num:\
- break\
- return ret\
- def append(self, value):\
- self.__str += str(value)\
Advertisement
Add Comment
Please, Sign In to add comment