Correct Way to Write in Python
punk.sagar at gmail.com
punk.sagar at gmail.com
Sat Aug 3 02:18:47 EDT 2013
Hi All,
Im new to Python. Im coming from C# background and want to learn Python.
I was used to do following thing in C# in my previous experiences. I want to know how do I implement below example in Python. How these things are done in Python.
[code]
public class Bank
{
public List<Customer> lstCustomers = new List<Customer>();
private string micrcode;
public void Bank()
{
customer
}
}
public class Customer
{
private srting customername;
public string CustomerName
{
get { return customername; }
set { customername = value; }
}
}
main()
{
Customer objCustomer = new Customer;
objCustomer.CustomerName = "XYZ"
Bank objBank = new Bank();
objBank.lstCustomer.Add(objCustomer);
}
[/code]
More information about the Python-list
mailing list