One thing I need to learn before I go further with Python is to thoroughly learn the logic rules. Sure, you can just learn the concepts but being able to write actual code will mean memorising these rules.
This happens with anything fairly new in the industry. Currently, Blockchain technologies are the magic fairy-dust that will solve all of the security problems, as well as validating everything from photos to news feeds.
Python’s len() method can be used to easily find the length of a string. It’s a simple and quick way to measure the length of a string (the number of characters) without having to write a lot of code. The syntax for using the len() method is fairly straightforward, and hard to mess up. Even I can manage it.
from sys import argv
script, file = argv
source = open(file)
indata = source.read()
print "The file called '%s' is %s bytes in length." % (file, len(indata))
Remember that len() calculates the string so it can be used for characters too. You could ask Python to count the letters in a word or sentence.