473,406 Members | 2,336 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How can i filter a numbers using wild characters.

1
Hi Experts!

I am trying to build a small python program. My query is how to differentiate b/w numbers- For eg-

print("Enter Number: ") #For eg- 3507,3508,3513,3514#
a = int(input())
if (a%2!=0): #For odd no.#
print("log in ??43 or ??49")
#How can I use first 2 digits here i.e ??43 or ??49#

if a == ????: #Which statement should I use for 3507 to print below statement
print("MgrCli -g -e 1")

if a == ????: #Which statement should I use for 3513 to print below statement
print("MgrCli -g -s 2")
Aug 30 '19 #1
1 1132
dwblas
626 Expert 512MB
Expand|Select|Wrap|Line Numbers
  1. #How can I use first 2 digits here i.e ??43 or ??49#
  2. number = 1243
  3. print(divmod(number, 100))
Next, fix your input statement. Trying to convert a list to an int will throw an error. There are many examples on the web https://pynative.com/python-accept-l...put-from-user/
Aug 30 '19 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: SatishPasala | last post by:
hi I am tring to remove all the wild characters from a string. Is there any short method to remove them in a single go. I am right now tring to replace one by one. Ex (999) 999-9999 I...
1
by: sekitoleko | last post by:
I need some help on representing rational numbers using structures
6
by: Nirjhar Oberoi | last post by:
Hi, Can you add two numbers using a Single Variable? :-) If yes then show me the code!!! Regards Nirjhar
3
by: HotFrost | last post by:
Hello everyone, i wonder if someone can give me some idea how and what is the right way to use wild characters in stored procedures with parameters... Assuming that @searchs_text is the...
4
by: GeekBoy | last post by:
I am reading a file of numbers using for loops. The numbers are in a grid as follows: 8 36 14 11 31 17 22 23 17 8 9 33 23 32 18 39 23 25 9 38 14 38 4 22 18 11 31 19 16 17 9 32 25 8 1 23
6
by: penny | last post by:
In this assignment we shall look at a possible representation of rational numbers in java using objects. The java language represents rational numbers using the same representation used for other...
9
by: Sreeraj | last post by:
hi, I am a beginner in Python. I wish to know how can i filter a list of strings using wild characters.ie Lets say i have list countries = . I need only the list of string starting with 'a'. ...
1
by: neelsfer | last post by:
I am developing an RFID-based timing system for timing cycling races. Currently have an application which was written for manual entry of race numbers using the keyboard. The RFID reader passes hex...
1
by: mrukmana02 | last post by:
Hello everyone. I need your help to finishing my Diploma Final Project. I was created MMI (Man Main Interface) using Visual Basic (Visual Studio 2012). My database using MySQL in phpMyAdmin. So, i...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.