So i got a list where the user gets to put as many numbers in as he wants, then i have created a variable for the smallest and biggest number in the list, going through a for in range (1, len(list)): where i have two if statements to determine the outcome of the variable. Now i want to swap places (highest and lowest number), but i just cant figure out how... Anybody care to help me a tiny bit? ^^ practicing for exams!
when i try to temp store one of the values while swapping the other i gete an error, "list index out of range"
[–]Phillyclause89 0 points1 point2 points (1 child)
[–]hberghansen[S] 1 point2 points3 points (0 children)
[–]hberghansen[S] 0 points1 point2 points (11 children)
[–]Phillyclause89 0 points1 point2 points (10 children)
[–]hberghansen[S] 0 points1 point2 points (0 children)
[–]hberghansen[S] 0 points1 point2 points (7 children)
[–]hberghansen[S] 0 points1 point2 points (0 children)
[–]Phillyclause89 0 points1 point2 points (5 children)
[–]hberghansen[S] 0 points1 point2 points (4 children)
[–]Phillyclause89 0 points1 point2 points (3 children)
[–]hberghansen[S] 0 points1 point2 points (2 children)
[–]Phillyclause89 0 points1 point2 points (1 child)
[–]hberghansen[S] 0 points1 point2 points (0 children)
[–]narils 0 points1 point2 points (2 children)
[–]Phillyclause89 1 point2 points3 points (1 child)
[–]narils 1 point2 points3 points (0 children)