Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Main Entry Point
- if __name__ == "__main__":
- # Enter Max Value
- n = int(input("Max Value: "))
- # Enter Array Values
- arr = map(int, input("Values: ").split())
- # Convet array to list
- lis = list(arr)
- # Get Max
- p = n # I belive you want to use the value you entered and not the max(lis) value
- # Get Output using an inline lambda
- output = [x for x in lis if x <= p] #
Advertisement
Add Comment
Please, Sign In to add comment