Australian Prime Minister Julia Gillard has had another sandwich thrown at her during a school visit.

Gillard was greeting children at Lyneham High School in Canberra on Thursday when someone aimed the salami at her.

Photos showed the sandwich bypassing her left arm and lying on the ground in front of her, as she shook hands with a crowd of students.

Gillard appeared unfazed by the prank, commenting afterwards: "They must have thought I was hungry".

An adviser to the PM said that Gillard was not even aware of the sandwich throwing until someone pointed it out to her afterwards.

The incident came after a student earlier this month threw a sandwich covered with Australia's favourite yeast-based lunch spread, Vegemite, at her during another school trip.

The student who threw the Vegemite sandwich was suspended from school for 15 days despite denying he was responsible.

There were no immediate suspects in Thursday's salami incident.

Australian Capital Territory Chief Minister Katy Gallagher, who was accompanying Gillard, laughed it off, saying: "Schools are full of kids, kids occasionally do silly things."