Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How to remove those None ? 1 gen = (f, 'M', female, Male, male, F, m, m, male, Female, x1 2 3 # Start your

image text in transcribed
How to remove those None ?
1 gen = ("f", 'M', "female", "Male", "male", "F", "m", "m", "male", "Female", "x"1 2 3 # Start your code below 4 gen2=0 5 for i in range(len(gen)): 6 if gen[i]=="f" or gen[i]=="F"or gen[i]=="female" or gen[i]=="Female": 7 print(gen2.append(0)) 8 9 10 elif gen[i]=="m" or gen[i]=="M"or gen(i)=="male"or gen[i]=="Male": 11 print (gen2.append(1)) 12 13 print (gen2) None None None None None None None None None None [0, 1, 0, 1, 1, 0, 1, 1, 1, 0]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

101 Database Exercises Text Workbook

Authors: McGraw-Hill

2nd Edition

0028007484, 978-0028007489

More Books

Students also viewed these Databases questions

Question

5. Discuss the key roles for training professionals.

Answered: 1 week ago