Question 16 Clarification:
What did you mean here? Write a function to determine whether all numbers in a list are unique. do we need to explicitly say which one is unique or we just need to identify if all of them are unique?
Here is a sample of my solution:
unique_list = 
for x in list1:
if x not in unique_list:
if len(list1) == len(unique_list):
list1 = [10, 20, 30, 40]
Thank you for your question!
The task is to determine whether all numbers are unique, there is no need to identify the unique numbers themselves. I think your solution is great and solves the task as expected. You can also study Giles' solution for an alternative approach :)
Where can I find Giles' solution so I can see an alternative approach? Thank you.
By clicking on the dropbox link, you will see two files - Python_Questions.txt containing the exercises and Python_Solutions.py where you will find Giles' solutions.