Re: Class Issue`

2019-03-05 Thread Kevin Hu
I believe for the correct behavior you’ll need: myCar = Car(color=‘blue’, miles=15000) myCar = Car(miles=25000, color=‘orange’) In which case both objects will be initialized as the way you’d expect. Python is a language with very weak typing, and it’ll happily shoehorn data into variables ev

Re: What's wrong with these codes as failed to read the strings in Chinese? Is it because Chinese characters can't be read on Mac? Many thanks

2018-11-09 Thread Kevin Hu
Dear Annie, Looks like you’re trying to read in a file with encoded characters. By default Python3 reads file in bytes, and you’ll need to decode it. Looks like it’s utf-8 encoding. More at: https://docs.python.org/3/howto/unicode.html You can si