# your code goes here
#hero inventory tuple
#create tuple
#print tuple
#count tuple length
#if in tuple prit smth
#check position of item by indexing it
#summon item by its position and print
#print part-slice of tuple by two defined positions
#concantenate 2 tuples
inventory = ( 'armor' ,
'rental shield' ,
'sword' , 'sword1' , 'sword2' , 'sword3' )
print inventory
inv1 = ( 'sword4' , 'sword5' )
if inv1 not in inventory:
inventory += inv1
len1 = len ( inventory)
len2 = -len ( inventory)
print len1
print inventory[ len2:len1]
print 'So you have' , len1, 'items in your inventory'
print 'If you want to summon an item enter its appropriate number between' , len1, 'and' , len2
enter1 = int ( raw_input ( 'Enter your number here' ) )
if enter1 >= len2 and enter1 <= len1:
print inventory[ enter1]
if enter1 == 3 :
print inventory[ 0 :3 ]
raw_input ( '\n \n P' )
IyB5b3VyIGNvZGUgZ29lcyBoZXJlCiNoZXJvIGludmVudG9yeSB0dXBsZQojY3JlYXRlIHR1cGxlCiNwcmludCB0dXBsZQojY291bnQgdHVwbGUgbGVuZ3RoCiNpZiBpbiB0dXBsZSBwcml0IHNtdGgKI2NoZWNrIHBvc2l0aW9uIG9mIGl0ZW0gYnkgaW5kZXhpbmcgaXQKI3N1bW1vbiBpdGVtIGJ5IGl0cyBwb3NpdGlvbiBhbmQgcHJpbnQKI3ByaW50IHBhcnQtc2xpY2Ugb2YgdHVwbGUgYnkgdHdvIGRlZmluZWQgcG9zaXRpb25zCiNjb25jYW50ZW5hdGUgMiB0dXBsZXMKaW52ZW50b3J5ID0gKCdhcm1vcicsCidyZW50YWwgc2hpZWxkJywKJ3N3b3JkJywgJ3N3b3JkMScsICdzd29yZDInLCAnc3dvcmQzJykKcHJpbnQgaW52ZW50b3J5CmludjEgPSAoJ3N3b3JkNCcsICdzd29yZDUnKQppZiBpbnYxIG5vdCBpbiBpbnZlbnRvcnk6CglpbnZlbnRvcnkgKz0gaW52MQpsZW4xID0gbGVuKGludmVudG9yeSkKbGVuMiA9IC1sZW4oaW52ZW50b3J5KQpwcmludCBsZW4xCnByaW50IGludmVudG9yeVtsZW4yOmxlbjFdCnByaW50ICdTbyB5b3UgaGF2ZScsIGxlbjEsICdpdGVtcyBpbiB5b3VyIGludmVudG9yeScKcHJpbnQgJ0lmIHlvdSB3YW50IHRvIHN1bW1vbiBhbiBpdGVtIGVudGVyIGl0cyBhcHByb3ByaWF0ZSBudW1iZXIgYmV0d2VlbicsIGxlbjEsICdhbmQnLCBsZW4yCmVudGVyMSA9IGludChyYXdfaW5wdXQoJ0VudGVyIHlvdXIgbnVtYmVyIGhlcmUnKSkKaWYgZW50ZXIxID49IGxlbjIgYW5kIGVudGVyMSA8PSBsZW4xOgoJcHJpbnQgaW52ZW50b3J5W2VudGVyMV0KaWYgZW50ZXIxID09IDM6CglwcmludCBpbnZlbnRvcnlbMDozXQpyYXdfaW5wdXQoJ1xuXG5QJyk=
stdout
('armor', 'rental shield', 'sword', 'sword1', 'sword2', 'sword3')
8
('armor', 'rental shield', 'sword', 'sword1', 'sword2', 'sword3', 'sword4', 'sword5')
So you have 8 items in your inventory
If you want to summon an item enter its appropriate number between 8 and -8
Enter your number here
stderr
Traceback (most recent call last):
File "prog.py", line 24, in <module>
EOFError: EOF when reading a line