Skip to content

Instantly share code, notes, and snippets.

@QuintD
Created March 8, 2022 09:26
Show Gist options
  • Select an option

  • Save QuintD/14b8be3b20991b737a794402ea791a03 to your computer and use it in GitHub Desktop.

Select an option

Save QuintD/14b8be3b20991b737a794402ea791a03 to your computer and use it in GitHub Desktop.
this is an exercise with Set in python. To check the highest item in a set of numbers.
b_set = {5, 20, 70, 46, 50}
highestNum = 0
for item in b_set:
if item > highestNum:
highestNum = item
print("the item with the highest vale in", b_set, "is", highestNum)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment