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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!