Those were real snakes in Yoda's hut in Star Wars: The Empire Strikes Back, which meant that Mark Hamill and Frank Oz had to carefully work around them.