Python study notes for Objective-C programmers
I don’t write Python often and I always forget its syntax. Therefore, I’m keeping a note of the major differences between Python and Objective-C that I’ve learnt here. Hope it helps you too!
Basics
Objective-C | Python |
---|---|
|| |
or |
&& |
and |
YES |
True |
NO |
False |
String
Objective-C | Python |
---|---|
string.length |
len(string) |
[string hasPrefix:prefix] |
string.startswith(prefix) |
[string hasSuffix:suffix] |
string.endswith(suffix) |
Comments
Objective-C
Python
str()
Objective-C
Python
Other
C / Objective-C
Python