Тёмный
No video :(

string in python | Lec-17 

MANISH KUMAR
Подписаться 21 тыс.
Просмотров 1,2 тыс.
50% 1

In this video, I have talked about the fundamentals of programming and Python. If you complete this, you will be well-versed in using tuples for different use cases.
Directly connect with me at:- topmate.io/man...
Q1. Swap the case of the string without using swapcase
inbuilt method for string
Input:- Programming Aasan Hai
Output:- pROGRAMMING aASAN hAI
Q2. Print the list of all unique ip addresses?
Input:-
"/region//us-east-a/north/resource/vminsatnce/subsid/ae-456-df/server/10.168.155.2/file_path//usr/bin/test1.csv",
"/region//us-east-b/north/resource/vminsatnce/subsid/ae-456-df/server/10.168.156.2/file_path/teams/bin/test1.csv",
"/region//us-east-c/north/resource/vminsatnce/subsid/ae-456-df/server/10.168.151.2/file_path/teams/bin/test1.csv",
"/region/japan/north/resource/vminsatnce/subsid/ae-456-df/server/10.168.155.22/file_path/data/bin/test1.csv",
"/region/india/north/resource/vminsatnce/subsid/ae-456-df/server/10.168.167.2/file_path//usr/bin/test1.csv",
"/region//us-east-a/north/resource/vminsatnce/subsid/ae-456-df/server/10.168.179.28/file_path//usr/bin/test1.csv",
"/region//us-east-b/north/resource/vminsatnce/subsid/ae-456-df/server/10.168.155.31/file_path/worklog/bin/test1.csv",
"/region//us-east-c/north/resource/vminsatnce/subsid/ae-456-df/server/10.168.151.2/file_path//tmp/bin/test1.csv"
]
Output:- ["10.168.155.2","10.168.156.2","10.168.151.2"
"10.168.155.22","10.168.167.2",
"10.168.179.28","10.168.155.31" ]
Discord channel:- / discord
For more queries reach out to me on my below social media handle.
Follow me on LinkedIn:- / manish-kumar-373b86176
Follow Me On Instagram:- / competitive_gyan1
Follow me on Facebook:- / manish12340
My Second Channel -- / @competitivegyan1
Interview series Playlist:- • Interview Questions an...
My Gear:-
Rode Mic:-- amzn.to/3RekC7a
Boya M1 Mic-- amzn.to/3uW0nnn
Wireless Mic:-- amzn.to/3TqLRhE
Tripod1 -- amzn.to/4avjyF4
Tripod2:-- amzn.to/46Y3QPu
camera1:-- amzn.to/3GIQlsE
camera2:-- amzn.to/46X190P
Pentab (Medium size):-- amzn.to/3RgMszQ (Recommended)
Pentab (Small size):-- amzn.to/3RpmIS0
Mobile:-- amzn.to/47Y8oa4 ( Aapko ye bilkul nahi lena hai)
Laptop -- amzn.to/3Ns5Okj
Mouse+keyboard combo -- amzn.to/3Ro6GYl
21-inch Monitor-- amzn.to/3TvCE7E
27-inch Monitor-- amzn.to/47QzXlA
iPad Pencil:-- amzn.to/4aiJxiG
iPad 9th Generation:-- amzn.to/470I11X
Boom Arm/Swing Arm:-- amzn.to/48eH2we
My PC Components:-
intel i7 Processor:-- amzn.to/47Svdfe
G.Skill RAM:-- amzn.to/47VFffI
Samsung SSD:-- amzn.to/3uVSE8W
WD Blue HDD:-- amzn.to/47Y91QY
RTX 3060Ti Graphic card:- amzn.to/3tdLDjn
Gigabyte Motherboard:-- amzn.to/3RFUTGl
O11 Dynamic Cabinet:-- amzn.to/4avkgSK
Liquid cooler:-- amzn.to/472S8mS
Antec Prizm FAN:-- amzn.to/48ey4Pj

Опубликовано:

 

29 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 33   
@ishaangupta4941
@ishaangupta4941 4 месяца назад
Very nice and helpfull series sir ! After this can you pls make a series on DB designing and concepts. Some of the common designs might be ( Cab system, trading app, shopping app , movie , streaming platforms etc ). Thanks
@manish_kumar_1
@manish_kumar_1 4 месяца назад
Noted
@Timezonee
@Timezonee 4 месяца назад
Bhaiya aap Apna according continue kro Lectures ko and . Thanks for your efforts
@user-sf7xi7zw6f
@user-sf7xi7zw6f 3 месяца назад
for i, string in enumerate(Input): Input[i] = string.split("/server/")[1].split("/")[0] print(list(set(Input)))
@rameshsannathi3255
@rameshsannathi3255 Месяц назад
ip = [] for val in data: ip.append(val.split("/")[9]) print(set(ip))
@raushansingh7530
@raushansingh7530 29 дней назад
Input = 'Programming Aasan Hai' output = '' for i in Input: if (i.islower()) == True: output=output + (i.upper()) elif (i.isupper()) == True: output = output + (i.lower()) elif (i.isspace()) == True: output = output + i logger.info(output)
@user-sf7xi7zw6f
@user-sf7xi7zw6f 3 месяца назад
Input = "Programming Aasan Hai" lst =[] for i in Input: if i.islower(): lst.append(i.upper()) else: lst.append(i.lower()) print(''.join(lst))
@NaveenKumar-ln9vg
@NaveenKumar-ln9vg 3 месяца назад
input = "Programming Aasan Hai" lst = [] for char in input: if char.islower(): lst.append(chr(ord(char)-32)) else: lst.append(chr(ord(char)+32)) output = (''.join(lst).replace("@",' ')) print(output)
@GaurangDeshani
@GaurangDeshani 4 месяца назад
Que:1 Solution:- originalStr = "WOrd" swapCaseStr = "" for char in originalStr: if ord(char) < 97 and ord(char) >= 65: value = ord(char) + 32 swapCaseStr = swapCaseStr+chr(value) elif ord(char) >= 97 and ord(char)
@satyamkumarjha4185
@satyamkumarjha4185 Месяц назад
dude that's so goood.
@AbhinavShukla-ki5jd
@AbhinavShukla-ki5jd Месяц назад
Q1 wrd="Programming Aasan Hai" newwrd="" for ch in wrd: if ch.isupper()==True: a=ord(ch) a+=32 newwrd=newwrd+(chr(a)) elif ch.islower()==True: a=ord(ch) a-=32 newwrd=newwrd+(chr(a)) elif ch.isspace()==True: newwrd=newwrd+" " print(newwrd) Q2 ans="" for ch in data: newdata=ch.split("/") ans=ans+newdata[10] print(ans)
@raushansingh7530
@raushansingh7530 28 дней назад
output =[] for i in Input: start_index = i.split("/server/")[1].split("/")[0] output.append(start_index) logger.info(output)
@nupoornawathey100
@nupoornawathey100 4 месяца назад
Pls share questions in description
@manish_kumar_1
@manish_kumar_1 4 месяца назад
Done
@safiadawood5637
@safiadawood5637 4 месяца назад
I could have used RegEx but I don't have a good hang of it
@chauhannirav569
@chauhannirav569 4 месяца назад
Hi sir, which languages or tools or Database you are preferred starting data engineering..
@chauhannirav569
@chauhannirav569 4 месяца назад
For fresher, I am currently studying bca last semester I have starting journey with data engineering.
@manish_kumar_1
@manish_kumar_1 4 месяца назад
Language- Python Database- MySql
@yashiyengar7366
@yashiyengar7366 4 месяца назад
Solution 1: def swap_case(stryng): Output = "" for i in stryng: if i == i.lower(): Output += i.upper() else: Output += i.lower() return Output print(swap_case(Output)) Solution 2: def uniq_ip_finder(Input): output = [] for i in Input: for j in i.split("/"): if "10." in j: output.append(j) output = list(set(output)) return output print(uniq_ip_finder(Input))
@manish_kumar_1
@manish_kumar_1 4 месяца назад
ip can't be always 10. Something it can be anything
@yashiyengar7366
@yashiyengar7366 4 месяца назад
@@manish_kumar_1 can I use a regex pattern to find the ip ?
@manish_kumar_1
@manish_kumar_1 4 месяца назад
@@yashiyengar7366 yes you can.
@yashiyengar7366
@yashiyengar7366 4 месяца назад
@@manish_kumar_1 This should do the job then hopefully it covers all edge cases. import re def uniq_ip_finder(input_list): ip_pattern = r'\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b' output = [] for i in input_list: matches = re.findall(ip_pattern, i) output.extend(matches) output = list(set(output)) return output output = uniq_ip_finder(input_list) print(output)
@chauhannirav569
@chauhannirav569 4 месяца назад
DB series but PostgreSql okay
@manish_kumar_1
@manish_kumar_1 4 месяца назад
Yes complete ok
@satyamkumarjha4185
@satyamkumarjha4185 Месяц назад
string_reversal = "RaM Is a bAd bOy" empty_string = "" for i in string_reversal: if i.isupper() == True: i = i.lower() empty_string = empty_string+i else: i = i.upper() empty_string = empty_string+i logger.info(empty_string)////reversal without using swap case
Далее
String methods in Python are easy 〰️
12:06
Просмотров 97 тыс.
Кого из блогеров узнали?
00:10
Просмотров 674 тыс.
.join() method in python | Lec-20
24:04
Просмотров 1,3 тыс.
5 Useful Dunder Methods In Python
16:10
Просмотров 58 тыс.
5 Useful F-String Tricks In Python
10:02
Просмотров 299 тыс.
AES encryption in python | Lec-25
22:58
Просмотров 1 тыс.
set in python | Lec-17
34:53
Просмотров 1 тыс.
Wait... PostgreSQL can do WHAT?
20:33
Просмотров 194 тыс.
Learn Python OOP in under 20 Minutes
18:32
Просмотров 486