Top 100 Python Interview Questions | Python Programming | Crack Python Interview |Great Learning

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ย. 2024

ความคิดเห็น • 178

  • @greatlearning
    @greatlearning  2 ปีที่แล้ว +6

    Register and get a free Certificate for the course: glacad.me/3pGFCHv
    Topics Covered
    00:00:00 Intro
    00:02:58 Agenda
    00:04:26 Interview questions and answers for beginners
    01:25:00 Interview questions and answers for experienced users
    01:57:20 Tricky interview program questions and solutions
    02:58:48 Summary

  • @priyanshuSinghh
    @priyanshuSinghh 2 ปีที่แล้ว +21

    Thanks for this video i placed in IBM bcz of your video 💥💥

  • @ironrose6
    @ironrose6 ปีที่แล้ว +7

    To clarify, at least half of all these questions are about NumPy and Pandas, so don't waste your time on those if they aren't applicable to you. Also, 29 at 2:49:29 has needless complexity and you will get docked for it in most interviews. To quickly swap the first and last elements in a list in python it's extremely simple and easy and always the same:
    my_list[0], my_list[-1] = my_list[-1], my_list[0]
    Only build something more robust if they ask you to- don't risk wasting time and not being able to complete your interview.

  • @user-yc1ih6iu9w
    @user-yc1ih6iu9w 11 หลายเดือนก่อน +1

    00:48:00 the string.capitalize() function changes ("this String") to ("This string") because it firstly converts all the characters to lower case and then just capitalize the first character.
    00:52:30 you can remove duplicated by
    l=[1,2,2,1,9,4,5,7,4]
    print(list(set(l)))
    ## set() function changes the order of the list, use it carefully##

  • @marianomartinez84
    @marianomartinez84 2 ปีที่แล้ว +26

    I'm just trying to do some constructive criticism here as this is viewed by a lot of beginners. IMO the example about passing values by value or by reference is misleading. In python, everything is passed by reference, except immutable objects which are passed by value. So in your first example where you are using a list and doing "print(arr)", the list is being passed by reference (actually a copy of the reference is passed). The print function could modify the list, it's just that it doesn't do it cause that's not its behavior. It would be better if you at least use a tuple instead of a list in that example, and better if you could talk about mutable and immutable types.

    • @mohitkhushlani6733
      @mohitkhushlani6733 2 หลายเดือนก่อน

      I agree with you, and I hope the instructor would have a better understanding of the python instead of just reading the already-made PPT/code/Content.

  • @aishwaryraj1142
    @aishwaryraj1142 2 ปีที่แล้ว +7

    l = [ 1,1,1,2,2,2,3,3,3,3,4,5,5,5,6,6]
    l = list(set(l))
    to remove duplicate elements from list

  • @avirajankitjain256
    @avirajankitjain256 3 ปีที่แล้ว +10

    Covers all concept Thanks.
    Please create a same video MySQL

  • @jaganvichu
    @jaganvichu 2 ปีที่แล้ว +108

    How many people's are going to attend interview?

    • @sravanireddy5277
      @sravanireddy5277 10 หลายเดือนก่อน +1

      Mee too

    • @arumugam-ok2lb
      @arumugam-ok2lb 10 หลายเดือนก่อน +1

      ​@@sravanireddy5277when is the interview????

    • @kc5351
      @kc5351 8 หลายเดือนก่อน

      Me❤

    • @FreeCoreUz
      @FreeCoreUz 3 หลายเดือนก่อน

      me

  • @rahulagarwal7182
    @rahulagarwal7182 2 ปีที่แล้ว +12

    great video ..it covers almost all the basic stuff that can be asked in an interview..Fantastic Ladies and Gentlemen

  • @bhargav7476
    @bhargav7476 2 ปีที่แล้ว +2

    Better code for palindrome 02:03:55 :
    x = 110011
    if str(x) == str(x)[::-1]:
    print(True)
    else:
    print(False)

    • @AMITKUMAR-np7el
      @AMITKUMAR-np7el 2 ปีที่แล้ว +1

      just write return str(x)==str(x)[::-1]

  • @anandmathad5678
    @anandmathad5678 2 ปีที่แล้ว +19

    When the concept is easy, like head and tail of a dataframe, he is explaining with examples.. But when he is explain complex concepts like merge, he is just walking through with explanation

    • @deus9246
      @deus9246 2 ปีที่แล้ว +4

      Yeah! I also spotted that. I think he should fix that. Spending a lot of time on easy questions and just blushing on important questions is not that exciting.

    • @anandkumar-ir8zj
      @anandkumar-ir8zj 2 ปีที่แล้ว +3

      True , I've seen this clever move by many instructors

  • @jyotibala7545
    @jyotibala7545 2 ปีที่แล้ว +4

    i have got alot knowledge of python. fantastic. while watching this video, i enjoyed aswell as you kept on saying fantastic. it was awesome.

  • @prathameshvaidya3508
    @prathameshvaidya3508 2 ปีที่แล้ว +11

    For 2:04(Check if input number is pallindrome or not)
    I thought this is the simple program
    n=int(input("ENTER INTEGERS:"))
    b='' "
    for i in str(n):
    b+=i
    c=b[::-1]
    d=int(c)
    if d==n:
    print("The given number is pallindrome")
    else:
    print("The given number is NOT pallindrome")

  • @saivivek754
    @saivivek754 3 ปีที่แล้ว +16

    Kindly share the Collab File discussed in the Video to download ! That would really help !!

  • @sandeepkanna1453
    @sandeepkanna1453 2 ปีที่แล้ว +22

    Thank you sur i got selected beacause of your interview question and your teaching

    • @shubhangikande2695
      @shubhangikande2695 2 ปีที่แล้ว +1

      How do you prepared for the placement?

    • @sandeepkanna1453
      @sandeepkanna1453 2 ปีที่แล้ว +2

      @@shubhangikande2695 I prepare the basics of python by this video

    • @sandeepkanna1453
      @sandeepkanna1453 2 ปีที่แล้ว

      @wizard scholar in cognizant bro salary 4 lpa

    • @sandeepkanna1453
      @sandeepkanna1453 2 ปีที่แล้ว

      @wizard scholar I am selected on campus bro

    • @Vikku_crazy_fan
      @Vikku_crazy_fan 2 ปีที่แล้ว

      @wizard scholarthrough their own website or linked in bro

  • @shashankbharatrajan4211
    @shashankbharatrajan4211 9 หลายเดือนก่อน

    Easiest way or logic for the 2nd largest number in a list, please check -->
    list1 = [2,7,3,5,9,11,6]
    list1.sort()
    list1.pop(-1)
    print(list1[-1])

  • @adityagarg673
    @adityagarg673 2 ปีที่แล้ว +13

    Thanks a lot sir for all your endeavors to enhance our skills. ❤

  • @AjitKumar-xo2lb
    @AjitKumar-xo2lb 2 ปีที่แล้ว +1

    2:49:50
    sample_list[0], sample_list[-1]=sample_list[-1], sample_list[0]

  • @andyramananjanahary6739
    @andyramananjanahary6739 7 หลายเดือนก่อน

    01:32:55 Actually, we don't need the dropna to remove the first the column. df=df[df.col1!=1] drops it

  • @gurukanalytics
    @gurukanalytics ปีที่แล้ว

    8. Advanced Users - Lambda function to add numbers in a list: ans = lambda x:sum(x)

  • @cassiehooo441
    @cassiehooo441 2 ปีที่แล้ว +1

    Q29: 52:30 use my_list = set(list(my_list)) works. But the output shows the values in different orders as the original list.

    • @vanihs8216
      @vanihs8216 2 ปีที่แล้ว

      Because set is an unordered collection of data

    • @sage.swagat
      @sage.swagat 2 ปีที่แล้ว

      U can use sort() to when it is in list.
      mylist=[1,2,3,3]
      newlist= sort(list(set(mylist)))

  • @Thewordmuse_
    @Thewordmuse_ 2 ปีที่แล้ว +2

    1st Question)
    What are Key features Of Python) 4:27

  • @MrSyzygyG
    @MrSyzygyG 2 ปีที่แล้ว

    1:33:37
    you have an error it should be: df[df.col2 != 'A']
    watching this because i'm the one behind the desk giving an interview lol, am going to ask the trick question about tuples, thanks. :)

  • @Surajpareek07
    @Surajpareek07 2 ปีที่แล้ว +6

    Great lesson!
    Here is a request, pls provide the materials also. I have faced this issue 2-3 times on great learning youtube videos... Pls do provide the material if you have mentioned in the video about it.

  • @ArchanaKshirsagar
    @ArchanaKshirsagar 3 ปีที่แล้ว +12

    for palindrome question. cant we write a function which returns the reverse of the number like
    def ispalindrome(s)
    return s[::,-1]
    s = 1221
    p = ispalindrome(str(s))
    if (p == s)
    print (' palindrome')
    else
    print('Not palindrome')

    • @zabroadcast
      @zabroadcast 2 ปีที่แล้ว +1

      if condition will fail as s in an int while p is str

  • @Propertylucknow209
    @Propertylucknow209 3 ปีที่แล้ว +6

    Please provide notes in the form of pdf of this session 🙏🙏🙏🙏

  • @kavitapatel117
    @kavitapatel117 3 ปีที่แล้ว +3

    Question 2:
    Keyword cannot* be used as identifiers, function names etc..

  • @greatlearning
    @greatlearning  3 ปีที่แล้ว +14

    🔥 Get your free certificate of completion for the Python Interview Questions and Answers course, Register Now: glacad.me/3pzJUAm

    • @TheRaju991
      @TheRaju991 3 ปีที่แล้ว +2

      Where is the jupyter notebook?

    • @funyatrawithrb571
      @funyatrawithrb571 3 ปีที่แล้ว

      nested list i think

    • @thealphabong9195
      @thealphabong9195 2 ปีที่แล้ว +1

      Could you please share the 100 Question asnswer sheet as pdf with us ?

  • @abhinavkale4632
    @abhinavkale4632 ปีที่แล้ว

    for question 55.
    import pandas as pd
    # Create a sample DataFrame
    df = pd.DataFrame({'col1': ['A', 'B', 'C', 'A', 'D'], 'col2': [1, 2, 3, 4, 5], 'col3':['A','A','B','C','D']})
    # Create an empty list to store the index of the rows to drop
    to_drop = []
    # Iterate through the rows of the DataFrame
    for index, row in df.iterrows():
    # Check if the value 'A' is present in any of the columns of the row
    if 'A' in row.values:
    # If it is, append the index to the list of rows to drop
    to_drop.append(index)
    print(df)
    # Drop the rows using the list of indexes
    df = df.drop(to_drop)
    print(df)

  • @jiyanshsonofdr.rajesh8516
    @jiyanshsonofdr.rajesh8516 ปีที่แล้ว +1

    Really thanks.

  • @RZOLTANM
    @RZOLTANM 2 หลายเดือนก่อน

    HI, Great set of questions. You mention that the Jupyter NB is available for this can please provide link to it?

  • @lakshminagapratyushaturlap9936
    @lakshminagapratyushaturlap9936 3 ปีที่แล้ว +7

    Appreciate your effort in collecting these questions..Thanks for the collection..Hope it helps in cracking TR for my placement

  • @faizaanalibaig6241
    @faizaanalibaig6241 9 หลายเดือนก่อน

    Thank you so much for the valueable information and boosting our skills

  • @arpithav5812
    @arpithav5812 2 ปีที่แล้ว

    Hats off to you for making such a great video with practicals. I understood more than i had learnt because of practicals. I dont know how to tahank you. Hoping to attend interview next month . Thank you so much.

  • @srinivassiddarth
    @srinivassiddarth ปีที่แล้ว

    Fantastic video. Thanks.🙏🙏🙏🙏🙏🙏

  • @jaxeight
    @jaxeight 3 ปีที่แล้ว +7

    Thank you for this. Very straightforward and easy.

    • @greatlearning
      @greatlearning  3 ปีที่แล้ว

      Hi we are glad that you liked our Content Please do subscribe to our Channel for Similar & Awesome Content

    • @kolukuluriaditya2284
      @kolukuluriaditya2284 2 ปีที่แล้ว

      Thanks for collecting questions ..very helpfull..

  • @prashantdas3618
    @prashantdas3618 2 ปีที่แล้ว

    Question 5)
    for i in range(1, 6):
    print((str(i)+' ')*i)

  • @elahehsobhani4322
    @elahehsobhani4322 2 ปีที่แล้ว +1

    Fantastic ! Thank you so much !
    Just I realized that question 28 in the last part has not been solved correctly. If you try it with a string of length 20, and try to have 4 chunks, it will give you 5 chunks instead

    • @greatlearning
      @greatlearning  2 ปีที่แล้ว +1

      Hi we are glad that you liked our Content Please do subscribe to our Channel for Similar & Awesome Content

    • @timurkeskinturk6898
      @timurkeskinturk6898 ปีที่แล้ว

      Yes, the question says "into n chunks" but solution is doing chunks with number of n element.

  • @jetendersharma
    @jetendersharma 2 ปีที่แล้ว +2

    great session.... its very helpful to appear in any python interview
    Can we get the jupyter file please ....

    • @jetendersharma
      @jetendersharma 2 ปีที่แล้ว

      If possible to share the file then pls share at G-drive of same account

  • @sohelmukadam
    @sohelmukadam 3 ปีที่แล้ว +3

    Please share the jupyter notebook

  • @AjitKumar-xo2lb
    @AjitKumar-xo2lb 2 ปีที่แล้ว +1

    2:11:29
    0
    0 1
    0 1 2
    0 1 2 3
    0 1 2 3 4
    for inp_num in range(6):
    for i in range(inp_num):
    print(i,end=" ")
    print("")

  • @malikgaruba4079
    @malikgaruba4079 2 ปีที่แล้ว +1

    Great refresher. Thanks man

  • @tiyasadey2211
    @tiyasadey2211 2 ปีที่แล้ว +3

    Thank you very much sir . It is really helpful 👍

  • @akshatmishra5115
    @akshatmishra5115 ปีที่แล้ว

    Completed this in one sitting
    Thank you sir

  • @dangeroussarcasm717
    @dangeroussarcasm717 3 ปีที่แล้ว +1

    Hi sir kindly plz make vdo on TabPy also it will be a great help 😍

  • @veereshkurubara8652
    @veereshkurubara8652 2 ปีที่แล้ว

    Thank you very much it was very helpful for me

  • @kobehaim5986
    @kobehaim5986 ปีที่แล้ว

    Hey,
    I liked the video and especially that you talked about Liverpool!

  • @itsall-in-one256
    @itsall-in-one256 5 หลายเดือนก่อน

    Is this applicable for data analyst/ data scientist interview or for development only?

  • @vinodangadi674
    @vinodangadi674 2 ปีที่แล้ว +2

    Nicely explained!! Very much helpful:)

    • @greatlearning
      @greatlearning  2 ปีที่แล้ว

      Hi we are glad that you liked our Content Please do subscribe to our Channel for Similar & Awesome Content

  • @sushilshah84
    @sushilshah84 2 ปีที่แล้ว

    Question No 17 - how to get access the csv file available in your computer in Colab Research?

  • @kanchidoshi6907
    @kanchidoshi6907 2 ปีที่แล้ว +1

    Can you please share the jupyter notebook or PDF?

  • @niranjanswain8276
    @niranjanswain8276 2 ปีที่แล้ว

    Thanks for sharing the knowledge...

  • @ExploreMalaya
    @ExploreMalaya 2 ปีที่แล้ว

    thank you i have gone through the whole video..

  • @82_dishamandal49
    @82_dishamandal49 2 ปีที่แล้ว +1

    Thankyou for this video❤

  • @prathameshvaidya3508
    @prathameshvaidya3508 2 ปีที่แล้ว +4

    Question No 37
    A tuple can contain only the predefined number of values, in dictionary there is no such limitation.
    A tuple can contain different values with different datatype while a dictionary can contain only one datatype value at a time

    • @prashantmahamuni
      @prashantmahamuni 2 ปีที่แล้ว +1

      d = {1 : 'one', 2 : 2} , dict can heterogeneous datatypes

    • @prathameshvaidya3508
      @prathameshvaidya3508 2 ปีที่แล้ว

      @@prashantmahamuni keys in dictionary are not heterogeneous dude

    • @ironrose6
      @ironrose6 ปีที่แล้ว +1

      @@prathameshvaidya3508 You didn't say dictionary key though, you said value. In dictionaries, a key is what references values. Make sure you don't get that mixed up in an interview.

    • @csbytes137
      @csbytes137 ปีที่แล้ว

      d = {1: "one", "one" : 1} is a valid dictionary, so dictionary keys can be heterogeneous. [version python 3.11]

  • @rishichowdary9764
    @rishichowdary9764 ปีที่แล้ว +1

    "fantastic guys" is the only Word I'm mostly listening while viewing the whole lecture.😂😂😂

  • @maheshchaugule8940
    @maheshchaugule8940 ปีที่แล้ว

    Thank you :)

  • @rohittech5605
    @rohittech5605 2 ปีที่แล้ว

    Ye video agar hindi me rahta to abhi million view rahta , fantastic

  • @jaydeeppatidar4189
    @jaydeeppatidar4189 2 ปีที่แล้ว

    Great video and actually like Interview.

    • @greatlearning
      @greatlearning  2 ปีที่แล้ว

      Hi we are glad that you liked our Content Please do subscribe to our Channel for Similar & Awesome Content

  • @mainlykanchan8740
    @mainlykanchan8740 2 ปีที่แล้ว

    Thanks for this video anirudh sir 🙏🏼

  • @travel_souls
    @travel_souls 2 ปีที่แล้ว

    2:34:00 everything in python is pass-by-reference

  • @1111Shahad
    @1111Shahad 2 ปีที่แล้ว

    Thank you Anirudh

  • @saishkhade5452
    @saishkhade5452 2 ปีที่แล้ว +1

    Sir can you share the link for google collab notebook which you have shown in the video?

  • @hazemmelliti6183
    @hazemmelliti6183 ปีที่แล้ว

    Thank you ! can u share the video slides ?

  • @DenizTheUnbeaten
    @DenizTheUnbeaten ปีที่แล้ว

    Thank u sir!

  • @vaishnavi.pvaishnavi.p8474
    @vaishnavi.pvaishnavi.p8474 2 ปีที่แล้ว

    Is it the correct time for a fresher to learn python from now! To get a job later so easily plz answer it bro???

  • @veerabadhraswamygopu628
    @veerabadhraswamygopu628 3 ปีที่แล้ว +1

    Next level 💯💯

  • @sonamgupta-zp1sr
    @sonamgupta-zp1sr 3 ปีที่แล้ว

    Thank you so much..✌

  • @ezgikalaycioglu4750
    @ezgikalaycioglu4750 2 ปีที่แล้ว

    another solution for palindrome:
    def palindrome(number):
    str_num=str(number)
    if str_num[::1] == str_num[::-1]:
    return True
    return False

  • @yashsharma-mr3uy
    @yashsharma-mr3uy 2 หลายเดือนก่อน

    if you don't mind can you provide PPT file of these question and answer

  • @PankajKumar-ut8hh
    @PankajKumar-ut8hh ปีที่แล้ว

    Question 5 of experienced users section, df.dropna() is not required. That is doing nothing for given dataset, and you are highlighting that part only.

  • @MDALAM-we7ty
    @MDALAM-we7ty ปีที่แล้ว

    Thanks

    • @greatlearning
      @greatlearning  ปีที่แล้ว

      Hi we are glad that you liked our Content Please do subscribe to our Channel for Similar & Awesome Content

  • @pallavidhamne8812
    @pallavidhamne8812 3 ปีที่แล้ว +1

    great

  • @amazonshoppingstore8888
    @amazonshoppingstore8888 2 ปีที่แล้ว +1

    Plzz yrrr Hindi mai bnaya kro

  • @pavan_kumar099
    @pavan_kumar099 2 ปีที่แล้ว +1

    Provide PDF in all question and answers

  • @kumarkatakam7625
    @kumarkatakam7625 2 ปีที่แล้ว +1

    Bro can u please provide any pdf for interview questions ..

  • @jaswanthkumar4450
    @jaswanthkumar4450 ปีที่แล้ว

    Armstrong Definition is wrong! We can only cube each digit if the given number has only 3 digits. For other number we need to use power of total number of digits.
    This is the definition:
    An Armstrong number is a number that is equal to the sum of its own digits each raised to the power of the number of digits.
    so if your number is 3452 then we should check if (3**4)+(4**4)+(5**4)+(2**4)==3452. if yes, it is Armstrong otherwise not.
    similarly for number 10 we should check like this (1**2)+(0**2)==10. this not armstrong since 1 not equal to 10.

  • @user-ci7bs5di3c
    @user-ci7bs5di3c ปีที่แล้ว

    in the 2nd answer first line that keywords are reserved words which are used as identifiers and function names and more, i cannot understand that. The keyword cannot be used as an identifier, function, or variable name.

  • @bhargav7476
    @bhargav7476 2 ปีที่แล้ว

    1:33:30 dropna( ) isn't doing anything, line below is dropping that row

  • @ashishmishra-um5zd
    @ashishmishra-um5zd ปีที่แล้ว

    buddy can I get a pdf for this really helpful

  • @codeatemail
    @codeatemail 2 ปีที่แล้ว

    these are interview questions can be designed for data science engineers

  • @blacktigershearthstoneadve6905
    @blacktigershearthstoneadve6905 ปีที่แล้ว

    The code at 2:54:46 is incorrect. It does not break a list into n chunks. It breaks it into unknown amount of chunks with n elements each.

  • @pavan_kumar099
    @pavan_kumar099 2 ปีที่แล้ว +1

    Plz send in PDF bro ..

  • @vinaybhargav3373
    @vinaybhargav3373 ปีที่แล้ว

    Bro can you please share the ppt which you have used to explain..,?

  • @tannisthaghosh7684
    @tannisthaghosh7684 2 ปีที่แล้ว

    Loved it

  • @krunalgoswami4654
    @krunalgoswami4654 2 ปีที่แล้ว +1

    4:30

  • @lakshyabhardwaj9541
    @lakshyabhardwaj9541 3 ปีที่แล้ว

    can the decorators be called inheritance of functions?

  • @shivani8537
    @shivani8537 2 ปีที่แล้ว

    52.26. my_list= list(set(my_list))

  • @ishitagupta2842
    @ishitagupta2842 ปีที่แล้ว

    its more towards data science and ml

  • @krishnaprasad-gc1gb
    @krishnaprasad-gc1gb 2 ปีที่แล้ว

    Dictionary in python is ordered from python 3.6+

  • @pratiknaikwade95
    @pratiknaikwade95 2 ปีที่แล้ว

    Sir can you please provide pdf of this .....

  • @darveshmohammad9012
    @darveshmohammad9012 3 ปีที่แล้ว

    Also share for java question

  • @chd9841
    @chd9841 2 ปีที่แล้ว

    Can we get this jupyter notebook

  • @amanahmed6057
    @amanahmed6057 2 ปีที่แล้ว

    make same video for SQL

  • @TheRaju991
    @TheRaju991 3 ปีที่แล้ว

    Which is the object that cannot be copied in python?

  • @raj-nq8ke
    @raj-nq8ke 2 ปีที่แล้ว

    2:40:40

  • @user-yg1te9xq7t
    @user-yg1te9xq7t ปีที่แล้ว

    can we get pdf for this seession

  • @ganeshdadi8109
    @ganeshdadi8109 2 ปีที่แล้ว

    bro please help me iam new learner to the python ,iam non it background

  • @praiseb2980
    @praiseb2980 2 ปีที่แล้ว

    Legendary

    • @greatlearning
      @greatlearning  2 ปีที่แล้ว

      Hi we are glad that you liked our Content Please do subscribe to our Channel for Similar & Awesome Content

  • @ratishkumar563
    @ratishkumar563 ปีที่แล้ว

    How many time you say Fantastic.