So I want to make a class based RPG, as a project to help me understand how classes work. Unfortunately, I didn't get far.
The below code is intended to make an instance of a character and have info in it like name, health, gold, exp, and the like. I am just testing the simplest of stuff right now, and I *think* that I got the name of the character to go into the instance but I can't get it back out.
class char:
def __init__(self,name):
self.name = name
a = raw_input("Name: ")
char(a)
print char(a)
Whenever I try to print the name of the instance, this comes out:
<__main__.char instance at 0x02B91F30>