Hey all, My class is trying to write a python script to do our seating assignments. I keep gaining a ValueError once I run this portion of my manuscript and I do not understand also why. Would someone have the ability to assist me out?
This is the percent I am having actually problems with: grad = <'AN', 'MG', 'CG', 'AJ', 'KJ', 'SP', 'SPaine', 'KS'>
under = <'EB', 'KB', 'AC', 'ND', 'RG', 'MK', 'SR', 'BS', 'EZ'>
list1 = <>
list2 = <>
list3 = <>
list4 = <>
list5 = <>
G = random.choices((grad), k = 2)
U = random.choices((under), k = 2)
The problem lies through the grad.remove(G) and the under.remove(U). I execute not understand also why it is throwing this error.
You are watching: List.remove(x): x not in list
This thcheck out is archived
New comments cannot be posted and votes cannot be cast
Sort by: best
Publish out G and also U. I think they are lists and also not strrings so : ("hi") does not equal (<"hi">). Check that out and also let me know.
Op · 4y
I believe it returns them as lists. Here is what it returns via the rerelocate commands commented out.
See more: Watch Game Of Thrones Season 8 Episode 5 Putlockers, Game Of Thrones Season 8 Episode 5
<<'KJ', 'KJ'>, <'AC', 'AC'>>
Continue this thread
More short articles from the learnpython community
Continue browsing in r/learnpython
Subtastecraftedmcd.com for posting concerns and asking for basic advice around your python code.
Created Oct 2, 2009
Top write-ups february 28th 2018Top write-ups of february, 2018Top write-ups 2018
helptastecraftedmcd.com coinstastecraftedmcd.com premiumtastecraftedmcd.com gifts
Back to Top