High Definition Standard Definition Theater
Video id : rDfvSE4AuwM
ImmersiveAmbientModecolor: #928c9f (color 2)
Video Format : (720p) openh264 ( https://github.com/cisco/openh264) mp4a.40.2 | 44100Hz
Audio Format: 140 ( High )
PokeEncryptID: 1c87df46c3b8693faed19211f596b9c19391ec78f479d9a3e59ef9d7e9e2d2dc15bb23d91d6508de7543451f3f72057f
Proxy : eu-proxy.poketube.fun - refresh the page to change the proxy location
Date : 1732474190020 - unknown on Apple WebKit
Mystery text : ckRmdlNFNEF1d00gaSAgbG92ICB1IGV1LXByb3h5LnBva2V0dWJlLmZ1bg==
143 : true
445,876 Views • Mar 23, 2023 • Click to toggle off description
In this short, I use the zip and enumerate function in python to find mismatched characters in strings.

Background Music:
Rain, Book And Cup Of Tea by | e s c p | escp-music.bandcamp.com/
Music promoted by www.free-stock-music.com/
Creative Commons / Attribution 4.0 International (CC BY 4.0)
creativecommons.org/licenses/by/4.0/
Metadata And Engagement

Views : 445,876
Genre: Education
License: Standard YouTube License
Uploaded At Mar 23, 2023 ^^


warning: returnyoutubedislikes may not be accurate, this is just an estiment ehe :3
Rating : 4.809 (1,613/32,196 LTDR)

95.23% of the users lieked the video!!
4.77% of the users dislieked the video!!
User score: 92.84- Overwhelmingly Positive

RYD date created : 2024-07-27T06:22:34.158164Z
See in json
Connections
Nyo connections found on the description ;_; report an issue lol

338 Comments

Top Comments of this video!! :3

@superleesa2629

1 year ago

for i in range(len(seq1)):
if seq1[i] != seq2[i]:
print(i)

2K |

@tritiumgaming4554

1 year ago

When java is less verbose than python in your example, you know you've screwed up somewhere

354 |

@WifeWantsAWizard

11 months ago

For those of you who are curious, he's got six "A"s in a row there. That's known as a "homopolymeric run" of nucleotides--in this case adenines. Because adenine forms an incredibly weak bond with itself, "A"s and "T"s have a limit to the length of a homopolymeric run before it creates debilitating cruciforms. That number is unknown, but there is a 30,000-long run of "A"s at the end of human mRNA critical to its functionality.

22 |

@big-anvil

1 year ago

It’s more efficient to do it in one for loop without zipping because then you can return early if the mismatch is found

10 |

@colek8990

11 months ago

Good job you got the lest efficient solution on the lest efficient language and you felt like showing everyone

1 |

@norude

1 year ago

[idx for idx,(a,b) in enumerate(zip(seq1,seq2)) if a!=b]
Gives an ordered list of missmatch indexes. Or you can use {} or () instead of [] to get a set or a generator
Also I'm pretty sure there is a built-in/first party module function to do this

11 |

@leperface

11 months ago

Hey thanks your shorts definitely give me bits of insight! I'm just messin around with pygame atm lol

|

@cantorgauss

1 year ago

You can do this with one line of code but you managed to do a super complex program instead. Genius.

16 |

@philipp_polland

1 year ago

Print([ i for i in range(min(len(seq1),len(seq2))) if seq1[i] != seq2[i] ])

4 |

@_cocoalabs

9 months ago

This was great also to be even more concise. You could replace the four loop with a list comprehension.

|

@qzbnyv

1 year ago

Haskell version below that returns a collected list of indices for which the two characters don’t match.

example :: String -> String -> [Int]
example seq1 seq2 = mapMaybe (\(i, x1, x2) -> if x1 /= x2 then Just i else Nothing) $ zip3 [0..] seq1 seq2

Alternatively, returning a list of triple tuples of the index and the two non-matching characters

example :: String -> String -> [(Int, Char, Char)]
example seq1 seq2 = mapMaybe (\tup@(_, x1, x2) -> if x1 /= x2 then Just tup else Nothing) $ zip3 [0..] seq1 seq2

2 |

@jetl4g390

1 year ago

This is nice. But for bioinformatics you can do more coplec sequence alignments/BLASTs using biopython.

79 |

@stefanoctaviansterea1266

1 year ago

That is like 3 times less efficient than simply iterating through the sequences

EDIT:
It's not. zip and enumerate return generators, so the results of each "step" are lazily-evaluated. The performance of the two solutions would be almost the same

534 |

@franciscoflamenco

1 year ago

[i for i, (x,y) in enumerate(zip(str1, str2)) if x != y]

2 |

@harduhum0r

1 year ago

Imagine having 2 strings, making a 2d array out ig them, then turning it into a 3d array and then just printing the index 💀

214 |

@srsh12345

11 months ago

thanks for the tip

1 |

@vanakornsirijongprasert1726

4 months ago

😮 please more contents like this

|

@studyit8111

1 year ago

This is damn helpful ❤

1 |

@satibel

1 year ago

For i in range(0..min(len(seq1),len(seq2))
If(seq1[i]!=seq2[i])
Print(i)

1 |

@69k_gold

1 year ago

That's basically just enumerate(zip()), pretty common for loop in Python

14 |

Go To Top