i am trying my first code in python writing classes and objects..
here is the code:
class Order:
def __init__(self,A):
self.a= A
def user1(self):
x = len(self.a)
i =0
while i < x:
value = A[i]
y = value
return y
A = ["AA","BB","CC","DD","EE","FF"]
honey= Order(A)
print (honey.user1())
i am getting output as AA................but i need to all elements from the A[] ,so only wrote for loop...but it print only output as AA.......
I need output as AA BB CC DD EE FF
how to achieve it using classes and object creation.....help pls
return yreturns a value from the function so the iteration stops.