What is the difference between & and && operators?

& operator is a bitwise AND, whereas && operator is a logical AND.

AK

Related Python Mentoring answers

All answers ▸

Explain the difference between local and global variables


How do you define a class in python


Write a function that takes an imput (call it usr_in), the user's age (usr_age) and the user's name (usr_nm) and outputs the following string: "Hi, My name is [usr_nm], I am [usr_age] years old, and my favorite number is [usr_in]"


Creating string from multiple strings(or characters)