Created
March 19, 2024 16:05
-
-
Save MahraibFatima/5ef4c45ea5743234c0910f85d565545f to your computer and use it in GitHub Desktop.
List containing only the positive numbers from the original list.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
numbers = [-2, -1, 0, 1, 2, 3] | |
positive_numbers = [num for num in numbers if num >= 0] | |
print("Positive Numbers:", positive_numbers) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment