Iterators doubt

does iterators works different for ifferent data structure.in given example we dont need *(it). the code ouputs without *.please explain

hello @guptanikhil898

for -> for each loop , here we dont have to use any * to access its values.

@aman212yadav
please give an example where we use * and where not

in case of for each loop ,we dont have to specify * .
for any other case where we are using iterator * is required

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.