LOS ANGELES — Think teens and 20-somethings who are used to looking up everything on smartphones have little use for the public library?

Think again.

People in their 20s and older teens are just as likely as older Americans to have visited a public library in the last year — and about as likely to have taken out books or browsed the shelves once they got there, a new study from the Pew Research Center’s Internet & American Life Project finds. Nearly two out of three said they had a library card.

Young people do use libraries differently: They are nearly twice as likely to have used computers and the Internet there, and much more likely to have hung out in libraries to study or read, Pew found.

Unlimited Digital Access. $1 for 4 weeks.

Yet 80 percent of Americans between the ages of 16 and 29 said librarians were “very important,” the survey found. Three out of four said it was crucial that libraries offer books to borrow — just as many said the same about free access to computers.

“Younger Americans don’t seem to be radically different from older adults in their conception of the library,” said Kathryn Zickuhr, a Pew research analyst. “They think libraries should have books. They think libraries should have librarians. They think libraries should have quiet spaces.”

The Pew survey included more than 2,200 people contacted via telephone, including land lines and cellphones, in October and November of last year.