Home>

python

Def del_Gost (L_GOST): # Faccs transfer List
    rm= Input ("Yak Shcho HTO z guests are not priotsh, incubate HTO SAME (for the list of ABO for status І ІМ идам):") .strip (). Title () # int or str
    IF RM in L_GOST: # checking in the list
        Return (L_GOST.Remove (RM))
    ELIF TYPE (INT (RM))== Type (int ()): # Here you need checking on what can be converted to INT, if not, then
        IF INT (RM) <
 LEN (L_GOST):
            Return (L_Gost.pop (Int (RM)))
        ELSE:
            Print (f '{rm} numbers in the list is not maє!')
            RETURN DEL_GOST (L_GOST)
    ELSE:
        Print ('Vu introduced not Korkknі Danі. Spent times.')
        RETURN DEL_GOST (L_GOST)
  • Answer # 1
    x= 1
    Y= 3.14.
    Print (IsInstance (X, Int))
    Print (ISINSTANCE (Y, INT))
    

    Conclusion:

    True
    False
    

    Well, in general, the question of the data entered through input, so ISInstance will not help here.

    insolor2021-07-22 07:59:18

    @insolor yes there is generally somehow pressed. Starting with the fact that I do not understand what it is inexplicitably introduced there)

    CrazyElf2021-07-22 08:07:41

    There is not Treka Nikogo Rosezi, Krim Pyton. If the output text is ignored, it is clear that the request is required by RM= INPUT (...), and then the Type comparison (int (rm))== type (int ()). Replacing this comparison on Isinstance will not particularly help.

    insolor2021-07-22 09:48:16
  • Answer # 2
    x= 1
    Y= 3.14.
    Print (IsInstance (X, Int))
    Print (ISINSTANCE (Y, INT))
    

    Conclusion:

    True
    False
    

    Well, in general, the question of the data entered through input, so ISInstance will not help here.

    insolor2021-07-22 07:59:18

    @insolor yes there is generally somehow pressed. Starting with the fact that I do not understand what it is inexplicitably introduced there)

    CrazyElf2021-07-22 08:07:41

    There is not Treka Nikogo Rosezi, Krim Pyton. If the output text is ignored, it is clear that the request is required by RM= INPUT (...), and then the Type comparison (int (rm))== type (int ()). Replacing this comparison on Isinstance will not particularly help.

    insolor2021-07-22 09:48:16