Mein Code auspacken:Valueerror zu viele Werte
from sys import argv
pl_magic, pl_pet = argv
pl_enemy = raw_input("The second enchanter:")
print "The most powerful enchanter is",pl_magic
print pl_pet,"is the pet of",pl_magic
print "They hate %s" %pl_enemy
Ausgabe in Powershell:
PS D:\FILE\LPHW> python ex13b.py 1 2 3
Traceback (most recent call last):
File "ex13b.py", line 2, in <module>
pl_magic, pl_pet = argv
ValueError: too many values to unpack
Ich frage mich, was mit dem Code falsch ....
Bearbeiten Sie Ihre Frage zu verwenden, richtige Codeformatierung. –
Mögliches Duplikat von [Python ValueError: zu viele Werte zum Entpacken] (https://stackoverflow.com/questions/7053551/python-valueerror-too-many-values-to-unpack) – LotPings