Complete the command to list all files including hidden ones in a directory.
ls [1]The -a option shows all files, including hidden ones starting with a dot.
Complete the command to find the current working directory.
[1]The pwd command prints the current directory path.
Fix the error in the command to display the first 5 lines of a file named 'log.txt'.
head [1] log.txtThe correct option is -n 5 to specify the number of lines.
Fill both blanks to create a dictionary comprehension that maps words to their lengths only if length is greater than 3.
{word: [1] for word in words if [2]The dictionary maps each word to its length using len(word). The condition filters words with length greater than 3 using len(word) > 3.
Fill all three blanks to create a dictionary comprehension that maps uppercase words to their lengths only if length is greater than 4.
{ [1]: [2] for word in words if [3] }The dictionary keys are uppercase words using word.upper(). Values are lengths with len(word). The condition filters words longer than 4 characters with len(word) > 4.