Back

Arbitrary arguments in Python Zero to hero Course

Created 1 year ago
48 Views
1 Comments
DhruvAd1XKz
@DhruvAd1XKz
DhruvAd1XKz
@DhruvAd1XKzProfile is locked. Login

How can we avoid duplicate entries while using arbitrary arguments?

eg. def duplicate(*details):

for x in details

print("Good day ", details)

duplicate('Anita', 'Dhruv', 'Yash', 'Dhruv')

how do I filter out the duplicate name 'Dhruv' in this list of arguments while printing?

My same query is for arbitrary keyword arguments too...

Comments
Please login to comment.