Question: Create a method in python that takes in a string and creates an array of tuple with it. For example: Input: (8,8), (9,2), (6,0), (4,3)
Create a method in python that takes in a string and creates an array of tuple with it. For example:
Input: "(8,8), (9,2), (6,0), (4,3)"
Output: [(8,8), (9,2), (6,0), (4,3)]
The method can take any string( of the same format) and ouput an array of any size.
THE OUTPUT SHOULD BE AN ARRAY OF TUPLES AND NOT AN ARRAY OF STRINGS OR CHARACTERS.
Thanks
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
