• Cursos
  • Compilador de Código
  • Debatir
  • Precios
  • Teams
Menu
0

Can someone explain output of this code for me? Order of elements

x=set(["a","b","c","d"]) y=set(["g","h"]) print(x|y,x&y,x-y,x^y)

pythonsets
3rd Apr 2022, 7:51 AM
Reza Jaferyan
Reza Jaferyan - avatar
2 Respuestas
+ 1
https://www.geeksforgeeks.org/JUMP_LINK__&&__python__&&__JUMP_LINK-set-operations-union-intersection-difference-symmetric-difference/amp/
3rd Apr 2022, 9:09 AM
NEZ
NEZ - avatar
0
set don't maintain order of inserted elements..
3rd Apr 2022, 12:26 PM
Jayakrishna 🇮🇳

¿Tienes a menudo preguntas como esta?

Aprende gratis de forma más eficaz

  • Introducción a Python

    7,1M de estudiantes

  • Introducción a Java

    4,7M de estudiantes

  • Introducción a C

    1,5M de estudiantes

  • Introducción a HTML

    7,5M de estudiantes

Ver todos los cursos
En tendencia hoy
Where make_unique is better than unique_ptr(raw pointer)
0 Votes
Best way to learn a new programming language fast?
1 Votes
Can someone help and explain better on slicing
1 Votes
Will i land a job
1 Votes
Course
1 Votes
Why we use oops in python rather than any function ?
1 Votes
Why we use return in function ?
0 Votes
someone helps how can i make two for loops over a 2d array in c ( i didn't learned pointers yet )
0 Votes
Leap year check
0 Votes
why is my leaderboard diferent than my brothers
0 Votes